
import http from "../../../utils/requestAI";
import type { addPrems } from "./MedicineLogs_type";
import {type ExampleGenerate,type Data } from "./MedicineLogs_type";



//列表
export const getMedicineLogs=(params?:Data)=>{

  return  http.get<ExampleGenerate>('/drugs/list',params);

}

export const getelderly=(params?:Data)=>{

  return  http.get<ExampleGenerate>('/elderly/list',params);

}

export const getdrugs=(id:number)=>{

  return  http.get(`/drugs/listForElderly/${id}`);

}

//删除
export const delMedicineLogs=(id:number)=>{

    console.log('删除1111',id);

    return  http.delete(`/drugs/delete/${id}`);
  
}

export const delMedicineLogsAll = (ids: number[]) => {
  console.log('批量删除执行', ids);
  return http.post(`/drugs/deleteAll`,ids);
}
export const addMedicineLogs = (data: addPrems) => {
  return http.post(`/drugs/add`, data);
}
